-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add ERC20FlashMint extension #407
base: main
Are you sure you want to change the base?
feat: add ERC20FlashMint extension #407
Conversation
✅ Deploy Preview for contracts-stylus canceled.
|
✅ Deploy Preview for contracts-stylus canceled.
|
This is my initial draft |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Ifechukwudaniel!
Thanks for the contribution!
The PR overall looks good, let's polish it a bit
Co-authored-by: Nenad <[email protected]>
Co-authored-by: Nenad <[email protected]>
chore: fixed tab
Create erc20-flashloan.adoc
chore: fixes
@0xNeshi what do you think about the new implementation for the extension |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost ready to merge.
/// | ||
/// Returns a boolean value indicating whether the operation succeeded. | ||
/// | ||
/// In order to have [`IErc3156FlashLender::flash_loan`] exposed in ABI, you |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section should be at the end of rust docs for the function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's an existing thread related to this, see #407 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not include benchmarks as they do not cover everything. I suggest removing this part at all, wdyt @qalisander?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If re-entrancy is not needed for this PR I would not include this change. Wdyt @qalisander @0xNeshi?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see if the reentrant feature is enabled in sdk, call
gets unsafe
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job guys!
There few comments left to be resolved, overall LGTM
NOTE: It is impossible to write any unit tests until it is possible to mock
contract::address()
in tests (see OpenZeppelin/stylus-test-helpers#5).Resolves #355
PR Checklist